<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>09_全局组件</title>
    <script src="../node_modules/vue/dist/vue.js"></script>
</head>
<body>
    <div id=app> 
        <com1></com1>
        <com1></com1>
        <com1></com1>
        <com1></com1>
    </div>


    <script>
        Vue.component('com1', {
            template: '<button @click="count++">你点了我{{count}}次</button>',
            data(){
                return { count: 0};
            }
        });
        const vm = new Vue({
            el:'#app',
            data:{
                msg: 'hello wrold!'
            }
        });
    </script>
</body>
</html>